<?php
$this->title = Yii::t('frontend', 'news_list')
?>
<div class="page">
    <div class="head_banner_bg" style="background-image: url(/static/frontend/image/news_bg.jpg)">
        <div class="contBox">
            <div class="news-page-banner clearfix">
                <h2><?=!empty($categoryName) ? $categoryName : '展会资讯'?></h2>
                <div class="pull-right list_head_title_tab flex">
                    <a href="#" class="flex f_center btn_red"><i class="iconfont">&#xe665;</i>展商报名</a>
                    <a href="#" class="flex f_center btn_yel"><i class="iconfont">&#xe608;</i>观众登记</a>
                </div>
            </div>
        </div>
    </div>
    <div class="contBox news-page-content">
        <div class="detailBox_title fbox">
            <span>新闻列表</span>
            <div class="fr detailBox_title_search news_search">
                <input type="text" placeholder="请输入查找内容" value="<?=isset($_GET['keywords'])?$_GET['keywords']:''?>" />
                <i class="btn_red iconfont" data-url="<?=Yii::$app->urlManager->createUrl(['news/index', 'categoryId' => '1'])?>">&#xe643;</i>
            </div>
        </div>
        <div class="detailMin_box_min clearfix">
            <!--左边正文内容-->
            <div class="detailMin_box_min_left pull-left">
                <!--数据展示内容-->
                <?php
                if (!empty($news)) {
                ?>
                <ul class="news_list">
                    <?php foreach($news as $v): ?>
                    <li class="news_item">
                        <a class="news_title" href="<?=Yii::$app->urlManager->createUrl(['news/detail','id'=>$v['id']])?>"><?= $v['title'] ?></a>
                        <div class="news_item_box clearfix">
                            <div class="f_relative text-center news_item_icon img pull-left">
                                <a href="<?=Yii::$app->urlManager->createUrl(['news/detail','id'=>$v['id']])?>"><img src="<?= $v['litpic'] ?>" /></a>
                                <div class="news_date"><span class="date-d"><?= date('d',$v['created_at']) ?></span><span class="date-ym"><?= date('Y.m',$v['created_at']) ?></span></div>
                            </div>
                            <div class="news_item_min pull-left">
                                <p class="news_desc"><?= $v['desc'] ?></p>
                                <span class="news_item_min_info flex t_gray">
                                    <i class="iconfont date_time">&#xe615;</i>
                                    <em><?= date('Y.m.d',$v['created_at']) ?></em>
                                    <i class="iconfont">&#xe612;</i>
                                    <em><?= $v['views'] ?></em>
                                </span>
                            </div>
                        </div>
                    </li>
                    <?php endforeach; ?>
                </ul>
                <div class="list-page text-center">
                    <?php echo \yii\widgets\LinkPager::widget([
                        'pagination' => $pages,
                        'maxButtonCount' => 6,
                        'nextPageLabel' => Yii::t('frontend', 'next_page'),
                        'prevPageLabel' => Yii::t('frontend', 'prev_page'),
                        'firstPageLabel' => Yii::t('frontend', 'first_page'),
                        'lastPageLabel' => Yii::t('frontend', 'last_page'),
                    ]); ?>
                </div>
                <?php
                }
                ?>
            </div>
            <!--右侧直通车-->
            <div class="detailMin_box_min_right pull-right">
                <div class="detailMin_box_min_right_title flex f_between f_relative">
                    <i class="iconfont btn_red right-hot-icon">&#xe63b;</i>
                    <span>热门展会</span>
                    <a href="<?=Yii::$app->urlManager->createUrl(['zhanhui/index'])?>" class="more">更多&gt;&gt;</a>
                </div>
                <div class="foot_line"></div>
                <?= \frontend\widgets\Hotexhibition::widget()?>
                <div class="detailMin_box_min_right_title flex f_between f_relative">
                    <i class="iconfont btn_red">&#xe6af;</i>
                    <span>展会资讯</span>
                    <a href="<?=Yii::$app->urlManager->createUrl(['news/index'])?>" class="more">更多&gt;&gt;</a>
                </div>
                <div class="foot_line"></div>
                <?= frontend\widgets\Exhibitionnews::widget()?>
                <!-- //谁来参展 -->
                <?= frontend\widgets\Exhibitor::widget()?>
                <div class="detailMin_box_min_right_recommoned img">
                    <?=\frontend\widgets\Ad::widget(['position' => 'news_list_right_bottom'])?>
                </div>
            </div>
            <!--对比浮层-->
        </div>

        <div class="divider"></div>
    </div>
</div>